/**
 * Copyright (c) 2015-2018,Retire 吴益峰 (372310383@qq.com).
 * <p>
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * <p>
 * http://www.apache.org/licenses/LICENSE-2.0
 * <p>
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package io.jplus.admin.service;

import com.jfinal.plugin.activerecord.Page;
import io.jboot.db.model.Column;
import io.jboot.db.model.Columns;
import io.jplus.admin.model.Menu;

import java.util.List;

public interface MenuService  {



    /**
     * 根据ID查找model
     *
     * @param id
     * @return
     */
    public Menu findById(Object id);


    /**
     * 查找全部数据
     *
     * @return
     */
    public List<Menu> findAll();


    /**
     * 根据ID删除model
     *
     * @param id
     * @return
     */
    public boolean deleteById(Object id);

    /**
     * 删除
     *
     * @param model
     * @return
     */
    public boolean delete(Menu model);


    /**
     * 保存到数据库
     *
     * @param model
     * @return
     */
    public boolean save(Menu model);

    /**
     * 保存或更新
     *
     * @param model
     * @return
     */
    public boolean saveOrUpdate(Menu model);

    /**
     * 更新 model
     *
     * @param model
     * @return
     */
    public boolean update(Menu model);

    public Page<Menu> paginateByColumns(int page, int size, List<Column> column, String orderBy);


    public List<Menu> findByColumn(Columns columns);

}
